package club.emergency.wechat.model.wechat_api;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * Create with IntelliJ IDEA
 * Project Name: wechat
 * Package Name: club.emergency.wechat.model.wechat_api
 * Date: 2019/3/4
 *
 * @author: 快乐的小菌菌
 * Description:
 */
@Data
@NoArgsConstructor
public class UserInfoSimple {

    private final List<UserInnerInfo> userList = new ArrayList<>();

    public UserInfoSimple userInnerInfo(String openid) {
        userList.add(new UserInnerInfo(openid));
        return this;
    }

    @Data
    @NoArgsConstructor
    static class UserInnerInfo {
        private String openid;
        private String lang;

        public UserInnerInfo(String openid) {
            this.openid = openid;
            this.lang = "zh_CN";
        }
    }
}
